package com.liwuji.liwujispringcloudopenfeign.config;

import feign.Logger;
import feign.auth.BasicAuthRequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * @author liwuji
 * @date 2024/3/5
 * @desc 全局日志配置
 **/
@Configuration
public class  FeignConfig{
    @Bean
    public Logger.Level level(){
        return Logger.Level.FULL;
    }

    /**
     * 添加拦截器
     * @return
     */
    @Bean
    public BasicAuthRequestInterceptor basicAuthRequestInterceptor(){
        return  new BasicAuthRequestInterceptor("liwuji","man");
    }
}
